/*单元格对像：hpx @ 2022-4-13 23:45*/
/* 一个单无格有4条边，分别是side0=side3
	      |------------- side(0)------------|
	      |                        			|
	   side (3)        		side(1)
	      |                                |
		  |                                |
		  |------------- side(2)-----------|
	    */


class mySell
{  

	constructor(name)
	{
        //一个单元格基本属性
		this.sides = [
				  
		        {name:"l",side:{x:0,y:0,r:100,b:100},color:{r:255,g:255,b:255},type:1,text:"hello",hide{s1:1,s2:1,s3:1,S4:1}},
		        {name:"t",side:{x:0,y:0,r:100,b:100},color:{r:255,g:255,b:255},type:1,text:"good",hide{s1:1,s2:1,s3:1,S4:1}},
		        {name:"r",side:{x:0,y:0,r:100,b:100},color:{r:255,g:255,b:255},type:1,text:"girl",hide{s1:1,s2:1,s3:1,S4:1}},
		        {name:"b",side:{x:0,y:0,r:100,b:100},color:{r:255,g:255,b:255},type:1,text:"!!",hide{s1:1,s2:1,s3:1,S4:1}},
		        ]
		
	};
}

(function ($) {
    $.cells = function (arg) {
        var name = "你好";     //这个是私有变量，外部无法访问
		var a = new mySell(name);
		
        this.testFun = function () {     //this.testFun方法，加上了this，就是公有方法了，外部可以访问。
		for(var i=0;i<4;i++)
            console.log(a.sides[i].text + "," + name);
        };
    };
})(jQuery);


